home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Tools / SFX-Player / Mpeg / MrMPEG / Prev.rexx < prev    next >
OS/2 REXX Batch file  |  2000-05-08  |  986b  |  35 lines

  1. /* Prev.rexx */
  2.  
  3. options results; address MrMPEG
  4.  
  5. MUIA_Selected        = 0x8042654b;    MUIA_List_Active    = 0x8042391c
  6. MUIA_List_Entries    = 0x80421654;    MUIV_List_Active_Bottom    = -3
  7. MUIV_List_Active_Up    = -4
  8.  
  9. list ID SLIST ATTRS MUIA_List_Entries; max = result
  10. list ID SLIST ATTRS MUIA_List_Active; current = result
  11. check ID RAND; rnd = result
  12. if rnd = 1 then do
  13.   flag = 0
  14.   do while flag = 0
  15.   temp = random(0, max - 1, time('S'))
  16.     if temp ~= current then do
  17.       list ID SLIST ATTRS MUIA_List_Active temp
  18.       flag = 1
  19.     end
  20.   end /* of while flag */
  21. end /* of if rnd */
  22. else if current ~= 0 then list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Up
  23. else list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Bottom
  24. list ID SLIST ATTRS MUIA_List_Active; temp_active = result
  25. setvar active temp_active
  26. check ID PLAY
  27. if result = 1 then do
  28.   call Stop()
  29.   delay(20)
  30.   check ID PLAY ATTRS MUIA_Selected 1
  31. end
  32. text ID ACTIV LABEL "\033b\033r"right(temp_active + 1, 3)
  33. call GetInfo()
  34. return
  35.